package cn.com.tbshuda.wordtoother.demo;

import java.io.FileWriter;
import java.io.IOException;

public class ExtractText {

    public static void writeStringToTxt(String content, String txtFileName) throws IOException {

        FileWriter fWriter = new FileWriter(txtFileName, true);
        try {
            fWriter.write(content);
        } catch (IOException ex) {
            ex.printStackTrace();
        } finally {
            try {
                fWriter.flush();
                fWriter.close();
            } catch (IOException ex) {
                ex.printStackTrace();
            }
        }
    }
}
